<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SARibbon: SARibbonToolButton类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="SA-logo.png"/></td>
  <td id="projectalign">
   <div id="projectname">SARibbon<span id="projectnumber">&#160;2.4.2</span>
   </div>
   <div id="projectbrief">SARibbon wiki</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('class_s_a_ribbon_tool_button.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">类</a> &#124;
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pro-methods">Protected 成员函数</a> &#124;
<a href="class_s_a_ribbon_tool_button-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">SARibbonToolButton类 参考</div></div>
</div><!--header-->
<div class="contents">

<p>Ribbon界面适用的toolButton  
 <a href="#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_s_a_ribbon_tool_button_8h_source.html">SARibbonToolButton.h</a>&gt;</code></p>
<div class="dynheader">
类 SARibbonToolButton 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_s_a_ribbon_tool_button.png" usemap="#SARibbonToolButton_map" alt=""/>
  <map id="SARibbonToolButton_map" name="SARibbonToolButton_map">
<area href="class_s_a_ribbon_color_tool_button.html" title="Refer to the color setting button in the office, which can display the color below the icon(参考office的..." alt="SARibbonColorToolButton" shape="rect" coords="0,112,158,136"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
类</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_a_ribbon_tool_button_1_1_private_data.html">PrivateData</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:a53fdbafe05f80a4048c17443fb1d99be" id="r_a53fdbafe05f80a4048c17443fb1d99be"><td class="memItemLeft" align="right" valign="top"><a id="a53fdbafe05f80a4048c17443fb1d99be" name="a53fdbafe05f80a4048c17443fb1d99be"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a53fdbafe05f80a4048c17443fb1d99be">RibbonButtonType</a> { <b>LargeButton</b>
, <b>SmallButton</b>
 }</td></tr>
<tr class="memdesc:a53fdbafe05f80a4048c17443fb1d99be"><td class="mdescLeft">&#160;</td><td class="mdescRight">按钮样式 <br /></td></tr>
<tr class="separator:a53fdbafe05f80a4048c17443fb1d99be"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a6292a56bab3a5e0e6e950ff0a2753c13" id="r_a6292a56bab3a5e0e6e950ff0a2753c13"><td class="memItemLeft" align="right" valign="top"><a id="a6292a56bab3a5e0e6e950ff0a2753c13" name="a6292a56bab3a5e0e6e950ff0a2753c13"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>SARibbonToolButton</b> (QWidget *parent=nullptr)</td></tr>
<tr class="separator:a6292a56bab3a5e0e6e950ff0a2753c13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ec812bc5f82d3a2af4bb896532231e2" id="r_a9ec812bc5f82d3a2af4bb896532231e2"><td class="memItemLeft" align="right" valign="top"><a id="a9ec812bc5f82d3a2af4bb896532231e2" name="a9ec812bc5f82d3a2af4bb896532231e2"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>SARibbonToolButton</b> (QAction *defaultAction, QWidget *parent=nullptr)</td></tr>
<tr class="separator:a9ec812bc5f82d3a2af4bb896532231e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90ff1ccf33a76e0f023e3774c6bf79b7" id="r_a90ff1ccf33a76e0f023e3774c6bf79b7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="#a53fdbafe05f80a4048c17443fb1d99be">RibbonButtonType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a90ff1ccf33a76e0f023e3774c6bf79b7">buttonType</a> () const</td></tr>
<tr class="memdesc:a90ff1ccf33a76e0f023e3774c6bf79b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">按钮样式  <br /></td></tr>
<tr class="separator:a90ff1ccf33a76e0f023e3774c6bf79b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6cf7919e58be615d465574709406dbe6" id="r_a6cf7919e58be615d465574709406dbe6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a6cf7919e58be615d465574709406dbe6">setButtonType</a> (const <a class="el" href="#a53fdbafe05f80a4048c17443fb1d99be">RibbonButtonType</a> &amp;<a class="el" href="#a90ff1ccf33a76e0f023e3774c6bf79b7">buttonType</a>)</td></tr>
<tr class="memdesc:a6cf7919e58be615d465574709406dbe6"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置按钮样式  <br /></td></tr>
<tr class="separator:a6cf7919e58be615d465574709406dbe6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5463b99bcbcaaddf86c73b3d8ae39f23" id="r_a5463b99bcbcaaddf86c73b3d8ae39f23"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a5463b99bcbcaaddf86c73b3d8ae39f23">isSmallRibbonButton</a> () const</td></tr>
<tr class="memdesc:a5463b99bcbcaaddf86c73b3d8ae39f23"><td class="mdescLeft">&#160;</td><td class="mdescRight">是否是小按钮  <br /></td></tr>
<tr class="separator:a5463b99bcbcaaddf86c73b3d8ae39f23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4dd31b24c8000e15c0dbee3c1b5ed9f1" id="r_a4dd31b24c8000e15c0dbee3c1b5ed9f1"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a4dd31b24c8000e15c0dbee3c1b5ed9f1">isLargeRibbonButton</a> () const</td></tr>
<tr class="memdesc:a4dd31b24c8000e15c0dbee3c1b5ed9f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">是否是大按钮  <br /></td></tr>
<tr class="separator:a4dd31b24c8000e15c0dbee3c1b5ed9f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89b4879c291fba308af60c39a0b11f51" id="r_a89b4879c291fba308af60c39a0b11f51"><td class="memItemLeft" align="right" valign="top"><a id="a89b4879c291fba308af60c39a0b11f51" name="a89b4879c291fba308af60c39a0b11f51"></a>
virtual QSize&#160;</td><td class="memItemRight" valign="bottom"><b>minimumSizeHint</b> () const Q_DECL_OVERRIDE</td></tr>
<tr class="separator:a89b4879c291fba308af60c39a0b11f51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69f1776079bf549ef63823d93e7dc06f" id="r_a69f1776079bf549ef63823d93e7dc06f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a69f1776079bf549ef63823d93e7dc06f">spacing</a> () const</td></tr>
<tr class="memdesc:a69f1776079bf549ef63823d93e7dc06f"><td class="mdescLeft">&#160;</td><td class="mdescRight">间距是几个重要矩形的间隔  <br /></td></tr>
<tr class="separator:a69f1776079bf549ef63823d93e7dc06f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53152bc3dcc27752ca6827ab1583d035" id="r_a53152bc3dcc27752ca6827ab1583d035"><td class="memItemLeft" align="right" valign="top"><a id="a53152bc3dcc27752ca6827ab1583d035" name="a53152bc3dcc27752ca6827ab1583d035"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>updateRect</b> ()</td></tr>
<tr class="separator:a53152bc3dcc27752ca6827ab1583d035"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44608a06c2e9cbdba72ea1c14a55a78d" id="r_a44608a06c2e9cbdba72ea1c14a55a78d"><td class="memItemLeft" align="right" valign="top">virtual QSize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a44608a06c2e9cbdba72ea1c14a55a78d">sizeHint</a> () const Q_DECL_OVERRIDE</td></tr>
<tr class="memdesc:a44608a06c2e9cbdba72ea1c14a55a78d"><td class="mdescLeft">&#160;</td><td class="mdescRight">toolbutton的尺寸确定是先定下字体的尺寸，再定下icon的尺寸，自底向上，保证字体能显示两行  <br /></td></tr>
<tr class="separator:a44608a06c2e9cbdba72ea1c14a55a78d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:ad7a93f39b9bf32d0218fb3269af8605a" id="r_ad7a93f39b9bf32d0218fb3269af8605a"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad7a93f39b9bf32d0218fb3269af8605a">setEnableWordWrap</a> (bool on)</td></tr>
<tr class="memdesc:ad7a93f39b9bf32d0218fb3269af8605a"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置在lite模式下是否允许文字换行，如果允许，则图标相对比较小，默认不允许  <br /></td></tr>
<tr class="separator:ad7a93f39b9bf32d0218fb3269af8605a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b1ca6c2d08bd4a7704de764a7a7ce20" id="r_a1b1ca6c2d08bd4a7704de764a7a7ce20"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1b1ca6c2d08bd4a7704de764a7a7ce20">isEnableWordWrap</a> ()</td></tr>
<tr class="memdesc:a1b1ca6c2d08bd4a7704de764a7a7ce20"><td class="mdescLeft">&#160;</td><td class="mdescRight">在lite模式下是否允许文字换行  <br /></td></tr>
<tr class="separator:a1b1ca6c2d08bd4a7704de764a7a7ce20"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a349f8ffba2150c532a36ab55375a4eb0" id="r_a349f8ffba2150c532a36ab55375a4eb0"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a349f8ffba2150c532a36ab55375a4eb0">setTextEllipsisAspectFactor</a> (qreal fac=1.4)</td></tr>
<tr class="memdesc:a349f8ffba2150c532a36ab55375a4eb0"><td class="mdescLeft">&#160;</td><td class="mdescRight">文本宽度估算时的宽度比高度系数  <br /></td></tr>
<tr class="separator:a349f8ffba2150c532a36ab55375a4eb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ae439aa77040384d4c1325789a39c4f" id="r_a7ae439aa77040384d4c1325789a39c4f"><td class="memItemLeft" align="right" valign="top">static qreal&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7ae439aa77040384d4c1325789a39c4f">textEllipsisAspectFactor</a> ()</td></tr>
<tr class="memdesc:a7ae439aa77040384d4c1325789a39c4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">文本宽度估算时的宽度比高度系数  <br /></td></tr>
<tr class="separator:a7ae439aa77040384d4c1325789a39c4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-methods" name="pro-methods"></a>
Protected 成员函数</h2></td></tr>
<tr class="memitem:aa2a2bfa662e01bd80bfe23cc9205a312" id="r_aa2a2bfa662e01bd80bfe23cc9205a312"><td class="memItemLeft" align="right" valign="top"><a id="aa2a2bfa662e01bd80bfe23cc9205a312" name="aa2a2bfa662e01bd80bfe23cc9205a312"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>paintEvent</b> (QPaintEvent *e) Q_DECL_OVERRIDE</td></tr>
<tr class="separator:aa2a2bfa662e01bd80bfe23cc9205a312"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa70be1fe676e7a9053a5f16cd2101965" id="r_aa70be1fe676e7a9053a5f16cd2101965"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa70be1fe676e7a9053a5f16cd2101965">resizeEvent</a> (QResizeEvent *e) Q_DECL_OVERRIDE</td></tr>
<tr class="memdesc:aa70be1fe676e7a9053a5f16cd2101965"><td class="mdescLeft">&#160;</td><td class="mdescRight">在resizeevent计算绘图所需的尺寸，避免在绘图过程中实时绘制提高效率  <br /></td></tr>
<tr class="separator:aa70be1fe676e7a9053a5f16cd2101965"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64a0ddccc882a441a9743a9d7ade5fcb" id="r_a64a0ddccc882a441a9743a9d7ade5fcb"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a64a0ddccc882a441a9743a9d7ade5fcb">mouseMoveEvent</a> (QMouseEvent *e) Q_DECL_OVERRIDE</td></tr>
<tr class="memdesc:a64a0ddccc882a441a9743a9d7ade5fcb"><td class="mdescLeft">&#160;</td><td class="mdescRight">鼠标移动事件  <br /></td></tr>
<tr class="separator:a64a0ddccc882a441a9743a9d7ade5fcb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adbe9f480e94f844b37ac26ad0e39cf09" id="r_adbe9f480e94f844b37ac26ad0e39cf09"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#adbe9f480e94f844b37ac26ad0e39cf09">mousePressEvent</a> (QMouseEvent *e) Q_DECL_OVERRIDE</td></tr>
<tr class="memdesc:adbe9f480e94f844b37ac26ad0e39cf09"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="#adbe9f480e94f844b37ac26ad0e39cf09" title="SARibbonToolButton::mousePressEvent">SARibbonToolButton::mousePressEvent</a>  <br /></td></tr>
<tr class="separator:adbe9f480e94f844b37ac26ad0e39cf09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab52db9405689a75e996457e48232cc01" id="r_ab52db9405689a75e996457e48232cc01"><td class="memItemLeft" align="right" valign="top"><a id="ab52db9405689a75e996457e48232cc01" name="ab52db9405689a75e996457e48232cc01"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>mouseReleaseEvent</b> (QMouseEvent *e) Q_DECL_OVERRIDE</td></tr>
<tr class="separator:ab52db9405689a75e996457e48232cc01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a922cb76a2e22a994d796a284076ae97e" id="r_a922cb76a2e22a994d796a284076ae97e"><td class="memItemLeft" align="right" valign="top"><a id="a922cb76a2e22a994d796a284076ae97e" name="a922cb76a2e22a994d796a284076ae97e"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>focusOutEvent</b> (QFocusEvent *e) Q_DECL_OVERRIDE</td></tr>
<tr class="separator:a922cb76a2e22a994d796a284076ae97e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a164bd3d3077d54db0eaeb451ff763341" id="r_a164bd3d3077d54db0eaeb451ff763341"><td class="memItemLeft" align="right" valign="top"><a id="a164bd3d3077d54db0eaeb451ff763341" name="a164bd3d3077d54db0eaeb451ff763341"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>leaveEvent</b> (QEvent *e) Q_DECL_OVERRIDE</td></tr>
<tr class="separator:a164bd3d3077d54db0eaeb451ff763341"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54ad65b2bd2a0d6a2bfad89736f069d7" id="r_a54ad65b2bd2a0d6a2bfad89736f069d7"><td class="memItemLeft" align="right" valign="top"><a id="a54ad65b2bd2a0d6a2bfad89736f069d7" name="a54ad65b2bd2a0d6a2bfad89736f069d7"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>hitButton</b> (const QPoint &amp;pos) const Q_DECL_OVERRIDE</td></tr>
<tr class="separator:a54ad65b2bd2a0d6a2bfad89736f069d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6abada9b11675887d40396a87f4b3db7" id="r_a6abada9b11675887d40396a87f4b3db7"><td class="memItemLeft" align="right" valign="top"><a id="a6abada9b11675887d40396a87f4b3db7" name="a6abada9b11675887d40396a87f4b3db7"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>event</b> (QEvent *e) Q_DECL_OVERRIDE</td></tr>
<tr class="separator:a6abada9b11675887d40396a87f4b3db7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af05d7f437e81d9c2529b257c970d0ae5" id="r_af05d7f437e81d9c2529b257c970d0ae5"><td class="memItemLeft" align="right" valign="top"><a id="af05d7f437e81d9c2529b257c970d0ae5" name="af05d7f437e81d9c2529b257c970d0ae5"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>changeEvent</b> (QEvent *e) Q_DECL_OVERRIDE</td></tr>
<tr class="separator:af05d7f437e81d9c2529b257c970d0ae5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5dc42d4cb5ebc3b6b894d2dbee85c294" id="r_a5dc42d4cb5ebc3b6b894d2dbee85c294"><td class="memItemLeft" align="right" valign="top"><a id="a5dc42d4cb5ebc3b6b894d2dbee85c294" name="a5dc42d4cb5ebc3b6b894d2dbee85c294"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>actionEvent</b> (QActionEvent *e) Q_DECL_OVERRIDE</td></tr>
<tr class="separator:a5dc42d4cb5ebc3b6b894d2dbee85c294"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad466bc82d32ecb12eb696feba8a8a08d" id="r_ad466bc82d32ecb12eb696feba8a8a08d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad466bc82d32ecb12eb696feba8a8a08d">paintButton</a> (QPainter &amp;p, const QStyleOptionToolButton &amp;opt)</td></tr>
<tr class="memdesc:ad466bc82d32ecb12eb696feba8a8a08d"><td class="mdescLeft">&#160;</td><td class="mdescRight">绘制按钮  <br /></td></tr>
<tr class="separator:ad466bc82d32ecb12eb696feba8a8a08d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9934d557c4daaa615c4638cd38646bd9" id="r_a9934d557c4daaa615c4638cd38646bd9"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9934d557c4daaa615c4638cd38646bd9">paintIcon</a> (QPainter &amp;p, const QStyleOptionToolButton &amp;opt, const QRect &amp;iconDrawRect)</td></tr>
<tr class="memdesc:a9934d557c4daaa615c4638cd38646bd9"><td class="mdescLeft">&#160;</td><td class="mdescRight">绘制图标  <br /></td></tr>
<tr class="separator:a9934d557c4daaa615c4638cd38646bd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea6b7a56df79a7c3f988c4866e2d4675" id="r_aea6b7a56df79a7c3f988c4866e2d4675"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aea6b7a56df79a7c3f988c4866e2d4675">paintText</a> (QPainter &amp;p, const QStyleOptionToolButton &amp;opt, const QRect &amp;textDrawRect)</td></tr>
<tr class="memdesc:aea6b7a56df79a7c3f988c4866e2d4675"><td class="mdescLeft">&#160;</td><td class="mdescRight">绘制文本  <br /></td></tr>
<tr class="separator:aea6b7a56df79a7c3f988c4866e2d4675"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af612a0e0ed5e5c6d493917f7b3c718ea" id="r_af612a0e0ed5e5c6d493917f7b3c718ea"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af612a0e0ed5e5c6d493917f7b3c718ea">paintIndicator</a> (QPainter &amp;p, const QStyleOptionToolButton &amp;opt, const QRect &amp;indicatorDrawRect)</td></tr>
<tr class="memdesc:af612a0e0ed5e5c6d493917f7b3c718ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">绘制Indicator  <br /></td></tr>
<tr class="separator:af612a0e0ed5e5c6d493917f7b3c718ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>Ribbon界面适用的toolButton </p>
<p>相对于普通toolbutton，主要多了两个类型设置，<a class="el" href="#a6cf7919e58be615d465574709406dbe6">setButtonType</a> 和 setLargeButtonType</p>
<dl class="section note"><dt>注解</dt><dd></dd></dl>
<dl class="section see"><dt>参见</dt><dd>setIconSize 函数不在起作用，iconsize是根据当前尺寸动态调整的 </dd></dl>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a90ff1ccf33a76e0f023e3774c6bf79b7" name="a90ff1ccf33a76e0f023e3774c6bf79b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a90ff1ccf33a76e0f023e3774c6bf79b7">&#9670;&#160;</a></span>buttonType()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="#a53fdbafe05f80a4048c17443fb1d99be">SARibbonToolButton::RibbonButtonType</a> SARibbonToolButton::buttonType </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>按钮样式 </p>
<dl class="section see"><dt>参见</dt><dd><a class="el" href="#a6cf7919e58be615d465574709406dbe6" title="设置按钮样式">setButtonType</a> </dd></dl>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="a1b1ca6c2d08bd4a7704de764a7a7ce20" name="a1b1ca6c2d08bd4a7704de764a7a7ce20"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b1ca6c2d08bd4a7704de764a7a7ce20">&#9670;&#160;</a></span>isEnableWordWrap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool SARibbonToolButton::isEnableWordWrap </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>在lite模式下是否允许文字换行 </p>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="a4dd31b24c8000e15c0dbee3c1b5ed9f1" name="a4dd31b24c8000e15c0dbee3c1b5ed9f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4dd31b24c8000e15c0dbee3c1b5ed9f1">&#9670;&#160;</a></span>isLargeRibbonButton()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool SARibbonToolButton::isLargeRibbonButton </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>是否是大按钮 </p>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="a5463b99bcbcaaddf86c73b3d8ae39f23" name="a5463b99bcbcaaddf86c73b3d8ae39f23"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5463b99bcbcaaddf86c73b3d8ae39f23">&#9670;&#160;</a></span>isSmallRibbonButton()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool SARibbonToolButton::isSmallRibbonButton </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>是否是小按钮 </p>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="a64a0ddccc882a441a9743a9d7ade5fcb" name="a64a0ddccc882a441a9743a9d7ade5fcb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a64a0ddccc882a441a9743a9d7ade5fcb">&#9670;&#160;</a></span>mouseMoveEvent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SARibbonToolButton::mouseMoveEvent </td>
          <td>(</td>
          <td class="paramtype">QMouseEvent *</td>          <td class="paramname"><span class="paramname"><em>e</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>鼠标移动事件 </p>
<p>由于Ribbon的Indicator和正常的Toolbutton不一样，因此无法用QStyleOptionToolButton的activeSubControls的状态</p>
<p>因此需要重新捕获鼠标的位置来更新按钮当前的一些状态 </p><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">e</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="adbe9f480e94f844b37ac26ad0e39cf09" name="adbe9f480e94f844b37ac26ad0e39cf09"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adbe9f480e94f844b37ac26ad0e39cf09">&#9670;&#160;</a></span>mousePressEvent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SARibbonToolButton::mousePressEvent </td>
          <td>(</td>
          <td class="paramtype">QMouseEvent *</td>          <td class="paramname"><span class="paramname"><em>e</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="#adbe9f480e94f844b37ac26ad0e39cf09" title="SARibbonToolButton::mousePressEvent">SARibbonToolButton::mousePressEvent</a> </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">e</td><td></td></tr>
  </table>
  </dd>
</dl>
<p>注意这里要用QAbstractButton的mousePressEvent，而不是QToolButton的mousePressEvent QToolButton的mousePressEvent主要是为了弹出菜单，这里弹出菜单的方式是不一样的，因此不能执行QToolButton的mousePressEvent</p>

</div>
</div>
<a id="ad466bc82d32ecb12eb696feba8a8a08d" name="ad466bc82d32ecb12eb696feba8a8a08d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad466bc82d32ecb12eb696feba8a8a08d">&#9670;&#160;</a></span>paintButton()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SARibbonToolButton::paintButton </td>
          <td>(</td>
          <td class="paramtype">QPainter &amp;</td>          <td class="paramname"><span class="paramname"><em>p</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QStyleOptionToolButton &amp;</td>          <td class="paramname"><span class="paramname"><em>opt</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>绘制按钮 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">p</td><td></td></tr>
    <tr><td class="paramname">opt</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a9934d557c4daaa615c4638cd38646bd9" name="a9934d557c4daaa615c4638cd38646bd9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9934d557c4daaa615c4638cd38646bd9">&#9670;&#160;</a></span>paintIcon()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SARibbonToolButton::paintIcon </td>
          <td>(</td>
          <td class="paramtype">QPainter &amp;</td>          <td class="paramname"><span class="paramname"><em>p</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QStyleOptionToolButton &amp;</td>          <td class="paramname"><span class="paramname"><em>opt</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QRect &amp;</td>          <td class="paramname"><span class="paramname"><em>iconDrawRect</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>绘制图标 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">p</td><td></td></tr>
    <tr><td class="paramname">opt</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>被 <a class="el" href="class_s_a_ribbon_color_tool_button.html#aae2d8cbc6200b6745f4e7b995e93945f">SARibbonColorToolButton</a> 重载.</p>

</div>
</div>
<a id="af612a0e0ed5e5c6d493917f7b3c718ea" name="af612a0e0ed5e5c6d493917f7b3c718ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af612a0e0ed5e5c6d493917f7b3c718ea">&#9670;&#160;</a></span>paintIndicator()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SARibbonToolButton::paintIndicator </td>
          <td>(</td>
          <td class="paramtype">QPainter &amp;</td>          <td class="paramname"><span class="paramname"><em>p</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QStyleOptionToolButton &amp;</td>          <td class="paramname"><span class="paramname"><em>opt</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QRect &amp;</td>          <td class="paramname"><span class="paramname"><em>indicatorDrawRect</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>绘制Indicator </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">p</td><td></td></tr>
    <tr><td class="paramname">opt</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aea6b7a56df79a7c3f988c4866e2d4675" name="aea6b7a56df79a7c3f988c4866e2d4675"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aea6b7a56df79a7c3f988c4866e2d4675">&#9670;&#160;</a></span>paintText()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SARibbonToolButton::paintText </td>
          <td>(</td>
          <td class="paramtype">QPainter &amp;</td>          <td class="paramname"><span class="paramname"><em>p</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QStyleOptionToolButton &amp;</td>          <td class="paramname"><span class="paramname"><em>opt</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QRect &amp;</td>          <td class="paramname"><span class="paramname"><em>textDrawRect</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>绘制文本 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">p</td><td></td></tr>
    <tr><td class="paramname">opt</td><td></td></tr>
  </table>
  </dd>
</dl>
<p>以下内容参考QCommonStyle.cpp void QCommonStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt,QPainter *p, const QWidget *widget) const case CC_ToolButton:</p>

</div>
</div>
<a id="aa70be1fe676e7a9053a5f16cd2101965" name="aa70be1fe676e7a9053a5f16cd2101965"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa70be1fe676e7a9053a5f16cd2101965">&#9670;&#160;</a></span>resizeEvent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SARibbonToolButton::resizeEvent </td>
          <td>(</td>
          <td class="paramtype">QResizeEvent *</td>          <td class="paramname"><span class="paramname"><em>e</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>在resizeevent计算绘图所需的尺寸，避免在绘图过程中实时绘制提高效率 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">e</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a6cf7919e58be615d465574709406dbe6" name="a6cf7919e58be615d465574709406dbe6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6cf7919e58be615d465574709406dbe6">&#9670;&#160;</a></span>setButtonType()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SARibbonToolButton::setButtonType </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="#a53fdbafe05f80a4048c17443fb1d99be">RibbonButtonType</a> &amp;</td>          <td class="paramname"><span class="paramname"><em>buttonType</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>设置按钮样式 </p>
<dl class="section note"><dt>注解</dt><dd>设置按钮样式过程会调用setToolButtonStyle，如果要改变toolButtonStyle,如设置为Qt::ToolButtonIconOnly,需要在此函数之后设置 </dd></dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">buttonType</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ad7a93f39b9bf32d0218fb3269af8605a" name="ad7a93f39b9bf32d0218fb3269af8605a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad7a93f39b9bf32d0218fb3269af8605a">&#9670;&#160;</a></span>setEnableWordWrap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SARibbonToolButton::setEnableWordWrap </td>
          <td>(</td>
          <td class="paramtype">bool</td>          <td class="paramname"><span class="paramname"><em>on</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置在lite模式下是否允许文字换行，如果允许，则图标相对比较小，默认不允许 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">on</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a349f8ffba2150c532a36ab55375a4eb0" name="a349f8ffba2150c532a36ab55375a4eb0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a349f8ffba2150c532a36ab55375a4eb0">&#9670;&#160;</a></span>setTextEllipsisAspectFactor()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SARibbonToolButton::setTextEllipsisAspectFactor </td>
          <td>(</td>
          <td class="paramtype">qreal</td>          <td class="paramname"><span class="paramname"><em>fac</em><span class="paramdefsep"> = </span><span class="paramdefval">1.4</span></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>文本宽度估算时的宽度比高度系数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">fac</td><td>系数，默认为1.4，此系数越大，按钮允许的宽度越宽</td></tr>
  </table>
  </dd>
</dl>
<p>超过此系数的宽度时，开始尝试换行，例如按钮高度为h，如果单行文本的宽度大于h*系数，则按钮将不进行横向拉伸，类似于maxwidth效果</p>
<p>此系数和maxwidth取最小值 </p>

</div>
</div>
<a id="a44608a06c2e9cbdba72ea1c14a55a78d" name="a44608a06c2e9cbdba72ea1c14a55a78d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44608a06c2e9cbdba72ea1c14a55a78d">&#9670;&#160;</a></span>sizeHint()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QSize SARibbonToolButton::sizeHint </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>toolbutton的尺寸确定是先定下字体的尺寸，再定下icon的尺寸，自底向上，保证字体能显示两行 </p>
<dl class="section note"><dt>注解</dt><dd>m_sizeHint的刷新需要注意 </dd></dl>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="a69f1776079bf549ef63823d93e7dc06f" name="a69f1776079bf549ef63823d93e7dc06f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69f1776079bf549ef63823d93e7dc06f">&#9670;&#160;</a></span>spacing()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SARibbonToolButton::spacing </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>间距是几个重要矩形的间隔 </p>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="a7ae439aa77040384d4c1325789a39c4f" name="a7ae439aa77040384d4c1325789a39c4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7ae439aa77040384d4c1325789a39c4f">&#9670;&#160;</a></span>textEllipsisAspectFactor()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">qreal SARibbonToolButton::textEllipsisAspectFactor </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>文本宽度估算时的宽度比高度系数 </p>
<p>超过此系数的宽度时，开始尝试换行，例如按钮高度为h，如果单行文本的宽度大于h*系数，则按钮将不进行横向拉伸，类似于maxwidth效果</p>
<p>此系数和maxwidth取最小值 </p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>C:/src/Qt/SARibbon/src/SARibbonBar/<a class="el" href="_s_a_ribbon_tool_button_8h_source.html">SARibbonToolButton.h</a></li>
<li>C:/src/Qt/SARibbon/src/SARibbonBar/<b>SARibbonToolButton.cpp</b></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_s_a_ribbon_tool_button.html">SARibbonToolButton</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0 </li>
  </ul>
</div>
</body>
</html>
